﻿using System;
using System.Xml.Serialization;

namespace Bambit.XmlRpc
{
	/// <summary>
	/// A <see cref="Member"/> object is an entry in an <see cref="RpcStruct"/> object.
	/// </summary>
	[XmlType]
	[Serializable]
	public class Member
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="Member"/> class.
		/// </summary>
		public Member()
		{
			Value = new Value();
		}

		/// <summary>
		/// Gets or sets the name.
		/// </summary>
		/// <value>The name of the member.</value>
		[XmlElement("name")]
		public string Name { get; set; }

		/// <summary>
		/// Gets or sets the value.
		/// </summary>
		/// <value>The value of the member.</value>
		[XmlElement("value")]
		public Value Value { get; set; }
	}

}
